package com.ebei.admin.model.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 组织架构
 * @author crazypenguin
 * @version 1.0
 * @created 2018/4/17
 */
@Data
@TableName("sys_organization")
public class SysOrg extends Model<SysOrg> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "org_id", type = IdType.AUTO)
    private Integer orgId;
    /**
     * 部门名称
     */
    private String name;
    /**
     * 排序
     */
    @TableField("order_num")
    private Integer orderNum;

    /**
     * 等级
     */
    @TableField("level_num")
    private String levelNum;
    /**
     * 组织类型(取字典表“组织类型”详情表ID)
     */
    @TableField("type")
    private Integer type;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     * 修改时间
     */
    @TableField("update_time")
    private Date updateTime;
    /**
     * 是否删除  -1：已删除  0：正常
     */
    @TableField("del_flag")
    private String delFlag;

    @TableField("parent_id")
    private Integer parentId;

    @Override
    protected Serializable pkVal() {
        return this.orgId;
    }

}
